// $_FILEHEADER_BEGIN ***************************
// 版权声明:Timer
// Copyright © 2015 - Timer All Rights Reserved
// 文件名称: ARSimpleCell.m
// 创建日期: 15/12/13
// 创 建 人: 甄鑫
// 文件说明: <#content#>
// $_FILEHEADER_END ******************************


#import "ARSimpleCell.h"
#import "ARViewHepler.h"
#import "ARCellHelper.h"

@implementation ARSimpleCell
- (void)awakeFromNib {
    // Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)cellType:(NSInteger)pageType andBaseType:(NSInteger)baseType{
    switch (baseType) {
        case 0://借入
        {
            switch (pageType) {
                case 1:case 0:case 11:case 12://借款中
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:25];
                    self.typeOneView.typeOneView_topLabel.text = @"剩余时间3小时";
                    self.typeOneView.typeOneView_downLabel.text = @"已借金额：2000.00";
                    self.typeOneView.typeOneView_topLabel.textColor = [UIColor grayColor];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 2:case 700://已满标
                {
                    self.typeTV = [TypeTwoView loadBundleNib];
                    self.typeTV.frame = CGRectMake(0, 0, SCREEN_WIDTH, self.cellBackView.frame.size.height);
                    self.typeTV.topV_topLabel.text = @"还款开始时间:2015-10-18";
                    self.typeTV.topV_downLabel.text = @"还款截止时间:2015-11-08";
                    self.typeTV.lessLabelView.hidden = YES;
                    self.typeTV.moreV_DL.hidden = YES;
                    self.typeTV.moreV_AL.textColor = self.typeTV.moreV_BL.textColor = self.typeTV.moreV_CL.textColor = ColorDefaultOrange;
                    self.typeTV.moreV_AL.text = @"已经还款:";
                    self.typeTV.moreV_BL.text = @"还需还款:";
                    self.typeTV.moreV_CL.text = @"下期还款:";
                    [self.cellBackView addSubview:self.typeTV];
                }
                    break;
                case 7:case 6://已流标
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.hidden = YES;
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.text = @"2015-10-11 22：37，已流标";
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 4:case 3:case 9:case 13://还款中
                {
                    self.typeTV = [TypeTwoView loadBundleNib];
                    self.typeTV.frame = CGRectMake(0, 0, SCREEN_WIDTH, self.cellBackView.frame.size.height);
                    self.typeTV.topV_topLabel.text = @"还款开始时间:2015-10-18";
                    self.typeTV.topV_downLabel.text = @"还款截止时间:2015-11-08";
                    self.typeTV.lessLabelView.hidden = YES;
                    self.typeTV.moreV_DL.hidden = YES;
                    self.typeTV.moreV_AL.textColor = self.typeTV.moreV_BL.textColor = self.typeTV.moreV_CL.textColor = ColorDefaultOrange;
                    self.typeTV.moreV_AL.text = @"已经还款:";
                    self.typeTV.moreV_BL.text = @"还需还款:";
                    self.typeTV.moreV_CL.text = @"下期还款:";
                    [self.cellBackView addSubview:self.typeTV];
                }
                    break;
                case 8:case 10://已还款
                {
                    self.typeTV = [TypeTwoView loadBundleNib];
                    self.typeTV.frame = CGRectMake(0, 0, SCREEN_WIDTH, self.cellBackView.frame.size.height);
                    self.typeTV.topV_topLabel.text = @"还款开始时间:2015-10-18";
                    self.typeTV.topV_downLabel.text = @"还款截止时间:2015-11-08";
                    self.typeTV.moreLabelView.hidden = YES;
                    self.typeTV.lessV_DownL.hidden = YES;
                    self.typeTV.lessV_TopL.textColor = [UIColor grayColor];
                    self.typeTV.lessV_TopL.text = @"还款已完成,13位好友已收到您的还款:";
                    self.typeTV.lessV_TopL.font = [UIFont systemFontOfSize:15];
                    [self.cellBackView addSubview:self.typeTV];
                }
                    break;
                case 5://已逾期
                {
                    self.typeTV = [TypeTwoView loadBundleNib];
                    self.typeTV.frame = CGRectMake(0, 0, SCREEN_WIDTH, self.cellBackView.frame.size.height);
                    self.typeTV.topV_topLabel.text = @"还款开始时间:2015-10-18";
                    self.typeTV.topV_downLabel.text = @"还款截止时间:2015-11-08";
                    self.typeTV.moreLabelView.hidden = YES;
                    self.typeTV.lessV_TopL.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeTV.lessV_TopL.text = @"逾期金额：5000";
                    self.typeTV.lessV_TopL.font = [UIFont systemFontOfSize:17];
                    
                    self.typeTV.lessV_DownL.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeTV.lessV_DownL.text = @"";
                    self.typeTV.lessV_DownL.font = [UIFont systemFontOfSize:17];
                    [self.cellBackView addSubview:self.typeTV];
                }
                    break;
                    
                default:
                    break;
            }
        }
            break;
        case 1://借出
        {
            switch (pageType) {
                case 1:case 0:case 11:case 12://借款中
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_topLabel.text = @"已出借金额(元)：500";
                    self.typeOneView.typeOneView_downLabel.text = @"预计总收益(元)：35";
                    self.typeOneView.typeOneView_topLabel.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 2:case 700://已满标
                case 4:case 3:case 9:case 13:
                case 8:case 10:
                {
                    self.typeTV = [TypeTwoView loadBundleNib];
                    self.typeTV.frame = CGRectMake(0, 0, SCREEN_WIDTH, self.cellBackView.frame.size.height);
                    self.typeTV.topV_topLabel.text = @"还款开始时间:2015-10-18";
                    self.typeTV.topV_downLabel.text = @"还款截止时间:2015-11-08";
                    self.typeTV.lessLabelView.hidden = YES;
                    self.typeTV.moreV_AL.textColor = self.typeTV.moreV_BL.textColor = self.typeTV.moreV_CL.textColor = ColorDefaultOrange;
                    self.typeTV.moreV_AL.text = @"已出借金额:";
                    self.typeTV.moreV_BL.text = @"预计总收益:";
                    self.typeTV.moreV_CL.text = @"已获收益:";
                    self.typeTV.moreV_DL.text = @"待获首页:";
                    [self.cellBackView addSubview:self.typeTV];

                }
                    break;
                case 7:case 6://已流标
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:14];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:14];
                    self.typeOneView.typeOneView_topLabel.text = @"时间:2015.11.07 15：31，已流标";
                    self.typeOneView.typeOneView_downLabel.text = @"出借金额:500元已自动退回余额";
                    self.typeOneView.typeOneView_topLabel.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 5://已逾期
                {
                    self.typeTV = [TypeTwoView loadBundleNib];
                    self.typeTV.frame = CGRectMake(0, 0, SCREEN_WIDTH, self.cellBackView.frame.size.height);
                    self.typeTV.topV_topLabel.text = @"回款开始时间:2015-10-18";
                    self.typeTV.topV_downLabel.text = @"回款截止时间:2015-11-08";
                    self.typeTV.moreLabelView.hidden = YES;
                    self.typeTV.lessV_TopL.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeTV.lessV_TopL.text = @"逾期金额：5000";
                    self.typeTV.lessV_TopL.font = [UIFont systemFontOfSize:17];
                    
                    self.typeTV.lessV_DownL.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeTV.lessV_DownL.text = @"";
                    self.typeTV.lessV_DownL.font = [UIFont systemFontOfSize:17];
                    [self.cellBackView addSubview:self.typeTV];
                }
                    break;
                    
                default:
                    break;
            }

        }
            break;
        case 2://理财
        {
            switch (pageType) {
                case 1:case 0:case 11:case 12://借款中
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:25];
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = @"50000.00";
                    self.typeOneView.typeOneView_topLabel.textColor = [UIColor grayColor];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 2:case 700://已满标
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:25];
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = @"50000.00";
                    self.typeOneView.typeOneView_topLabel.textColor = [UIColor grayColor];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 7:case 6://已流标
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:25];
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = @"50000.00";
                    self.typeOneView.typeOneView_topLabel.textColor = [UIColor grayColor];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 4:case 3:case 9:case 13://还款中
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:25];
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = @"50000.00";
                    self.typeOneView.typeOneView_topLabel.textColor = [UIColor grayColor];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 8:case 10://已还款
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:25];
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = @"50000.00";
                    self.typeOneView.typeOneView_topLabel.textColor = [UIColor grayColor];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                case 5://已逾期
                {
                    self.typeOneView = [TypeOneSimpleView loadBundleNib];
                    self.typeOneView.frame = CGRectMake(0, 0, SCREEN_WIDTH,self.cellBackView.frame.size.height);
                    self.typeOneView.typeOneView_topLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_downLabel.font = [UIFont systemFontOfSize:17];
                    self.typeOneView.typeOneView_topLabel.text = @"逾期金额：5000";
                    self.typeOneView.typeOneView_downLabel.text = @"";
                    self.typeOneView.typeOneView_topLabel.textColor = [ARViewHepler getNavColor:pageType];
                    self.typeOneView.typeOneView_downLabel.textColor = [ARViewHepler getNavColor:pageType];
                    [self.cellBackView addSubview:self.typeOneView];
                }
                    break;
                    
                default:
                    break;
            }

        }
            break;
        default:
            break;
    }
    

}
- (void)setData:(id)data
{
    ARCellModel *model = (ARCellModel *)data;
    switch ([model.cellBaseType integerValue]) {
        case 0://借入
        {
            switch (model.parentVCType) {
                case 1:case 0:case 11:case 12://借款中
                {
                    if ([[model.data remainhour] integerValue]==0) {
                        self.typeOneView.typeOneView_topLabel.text = [NSString stringWithFormat:@"剩余时间：%@分钟",[model.data remainminute]];
                    }else{
                        self.typeOneView.typeOneView_topLabel.text = [NSString stringWithFormat:@"剩余时间：%@小时",[model.data remainhour]];
                    }
                    
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"已借金额：%@",[model.data investamount]];

                }
                    break;
                case 2:case 700://已满标
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"还款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];
                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"还款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    self.typeTV.moreV_AL.text = [NSString stringWithFormat:@"已经还款：%@",[model.data objectForKey:@"realrepayamount"]];
                    self.typeTV.moreV_BL.text = [NSString stringWithFormat:@"还需还款：%.2f",[[NSString stringWithFormat:@"%.@",[model.data objectForKey:@"dutorepayamount"]] floatValue]];
                    self.typeTV.moreV_CL.text = [NSString stringWithFormat:@"下期还款：%@",[model.data objectForKey:@"nextrepayamount"]];
                }
                    break;
                case 7:case 6://已流标
                {
                    self.typeOneView.typeOneView_downLabel.text = [ NSString stringWithFormat:@"%@，已流标",[self timerStrWithTime:[model.data objectForKey:@"interesttime"]]];
                }
                    break;
                case 4:case 3:case 9:case 13://还款中
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"还款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];

                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"还款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    self.typeTV.moreV_AL.text = [NSString stringWithFormat:@"已经还款：%@",[model.data objectForKey:@"realrepayamount"]];
                    
                    self.typeTV.moreV_BL.text = [NSString stringWithFormat:@"还需还款：%.2f",[[NSString stringWithFormat:@"%@",[model.data objectForKey:@"dutorepayamount"]] floatValue]];
                    self.typeTV.moreV_CL.text = [NSString stringWithFormat:@"下期还款：%@",[model.data objectForKey:@"nextrepayamount"]];
                }
                    break;
                case 8:case 10://已还款
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"还款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];
                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"还款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    
                    self.typeTV.lessV_TopL.text = [NSString stringWithFormat:@"还款已完成,%@位好友已收到您的还款;",[model.data objectForKey:@"totalRecords"]];
                }
                    break;
                case 5://已逾期
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"还款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];
                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"还款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    
                    self.typeTV.lessV_TopL.text = [NSString stringWithFormat:@"逾期金额：%@",[model.data objectForKey:@"timeOutAmount"]];
                    self.typeTV.lessV_DownL.text = @"";
                }
                    break;
                    
                default:
                    break;
            }
        }
            break;
        case 1://借出
        {
            switch (model.parentVCType) {
                case 1:case 0:case 11:case 12://借款中
                {
                    self.typeOneView.typeOneView_topLabel.text = [NSString stringWithFormat:@"已出借金额(元)：%.2f", [[NSString stringWithFormat:@"%@",[model.data objectForKey:@"income"]] floatValue]];
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"预计总收益(元)：%.2f",[[NSString stringWithFormat:@"%@",[model.data objectForKey:@"totalpreinterest"]] floatValue]];
                }
                    break;
                case 2:case 700://已满标
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"回款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];
                    
                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"回款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    self.typeTV.moreV_AL.text = [NSString stringWithFormat:@"已出借金额(元)：%.2f", [[NSString stringWithFormat:@"%@",[model.data objectForKey:@"income"]] floatValue]];
                    self.typeTV.moreV_DL.hidden = YES;
                    self.typeTV.moreV_BL.text = [NSString stringWithFormat:@"已获收益：%@",[model.data objectForKey:@"alincome"] ];
                    self.typeTV.moreV_CL.text =[NSString stringWithFormat:@"待获收益：%@",[model.data objectForKey:@"totalpreinterest"] ];
                
                }
                    break;
                case 4:case 3:case 9:case 13:
                case 8:case 10:
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"回款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];
                    
                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"回款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    self.typeTV.moreV_AL.text = [NSString stringWithFormat:@"已出借金额(元)：%.2f", [[NSString stringWithFormat:@"%@",[model.data objectForKey:@"income"]] floatValue]];
                    self.typeTV.moreV_BL.text = [NSString stringWithFormat: @"预计总收益：%@",[model.data objectForKey:@"totalpreinterest"] ];
                    self.typeTV.moreV_CL.text = [NSString stringWithFormat:@"已获收益：%@",[model.data objectForKey:@"alincome"] ];
                    self.typeTV.moreV_DL.text =[NSString stringWithFormat:@"待获收益：%@",[model.data objectForKey:@"toincome"] ];
                }
                    break;
                case 7:case 6://已流标
                {
                    self.typeOneView.typeOneView_topLabel.text = [NSString stringWithFormat:@"时间:%@，已流标" ,[self timerStrWithTime:[model.data objectForKey:@"interesttime"]]];
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat: @"出借金额:%@元已自动退回余额",[model.data objectForKey:@"income"]];
                }
                    break;
                case 5://已逾期
                {
                    self.typeTV.topV_topLabel.text = [NSString stringWithFormat:@"回款开始时间:%@",[self timerStrWithTime:[model.data fetchInteresttime]]];
                    self.typeTV.topV_downLabel.text = [NSString stringWithFormat:@"回款截止时间:%@",[self timerStrWithTime:[model.data objectForKey:@"endtime"]]];
                    

                    self.typeTV.lessV_TopL.text = [NSString stringWithFormat:@"逾期金额：%@",[model.data objectForKey:@"timeOutAmount"]];
                    self.typeTV.lessV_TopL.frame = CGRectMake(0, 100, SCREEN_WIDTH, 30);
                    self.typeTV.lessV_DownL.text = @"";
                }
                    break;
                    
                default:
                    break;
            }
            
        }
            break;
        case 2://理财
        {
            switch (model.parentVCType) {
                case 1:case 0:case 11:case 12://借款中
                {
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"%@",[model.data objectForKey:@"creditamount"]];
                }
                    break;
                case 2:case 700://已满标
                {
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"%@",[model.data objectForKey:@"creditamount"]];
                }
                    break;
                case 7:case 6://已流标
                {
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"%@",[model.data objectForKey:@"creditamount"]];
                }
                    break;
                case 4:case 3:case 9:case 13://还款中
                {
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"%@",[model.data objectForKey:@"creditamount"]];
                }
                    break;
                case 8:case 10://已还款
                {
                    self.typeOneView.typeOneView_topLabel.text = @"系统推荐信用额度";
                    self.typeOneView.typeOneView_downLabel.text = [NSString stringWithFormat:@"%@",[model.data objectForKey:@"creditamount"]];
                }
                    break;
                case 5://已逾期
                {
                    self.typeOneView.typeOneView_topLabel.text = [NSString stringWithFormat:@"逾期金额：%@",[model.data objectForKey:@"timeOutAmount"]];
                    self.typeOneView.typeOneView_downLabel.text = @"";
                }
                    break;
                    
                default:
                    break;
            }
            
        }
            break;
        default:
            break;
    }
    
}
- (void)reSet
{
    
}
- (id)getData
{
    return nil;
}
- (void)setDelegate:(id)delegate
{
    
}


- (NSMutableAttributedString *)labelStr:(NSString *)baseStr andlocation:(NSInteger)location andFirstColor:(UIColor *)fc andLastColor:(UIColor *)lc{
    NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:baseStr];
    [str addAttribute:NSForegroundColorAttributeName value:fc range:NSMakeRange(0, location)];
    [str addAttribute:NSForegroundColorAttributeName value:lc range:NSMakeRange(location, str.length-5)];
    return str;

}


- (NSString *)timerStrWithTime:(NSString *)time{
    NSDate *detaildate=[NSDate dateWithTimeIntervalSince1970:[time doubleValue]/1000+28800];
    NSLog(@"date:%@",[detaildate description]);
    //实例化一个NSDateFormatter对象
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    //设定时间格式,这里可以设置成自己需要的格式
    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
    
    NSString *currentDateStr = [dateFormatter stringFromDate: detaildate];
    return currentDateStr;
}

@end
